using BLToolkit.Data;
using dbvc.data;

namespace dbvc.Queries
{
    public class SecurityQuery
    {
        public static db_user GetUser(string login, string pass)
        {
            using (var db = new DAA())
            {
                return db.SetCommand(
                    "SELECT * FROM db_user WHERE name = @usr AND pass = @pass",
                    db.Parameter("usr", login),
                    db.Parameter("pass", pass)).ExecuteObject<db_user>();
            }
        }
    }
}